<template>
    <div class="app_goods_detail">
        <div class="group" v-if="user.isgroup && user.group.user_number>10">
            总佣金:<span v-text="parseInt(info.price*info.percentage*100)/100"></span>
            <div class="btn" @click="group_remove()" v-if="isjoin">移除我的群</div>
            <div class="btn" @click="group_add()" v-if="!isjoin">加入我的群</div>
        </div>
        <div id="top">
            <div class="pic">
                <img v-if="info.pic" :src="resurl+info.pic+'?x-oss-process=image/resize,m_fill,w_750,h_400'" alt="">
            </div>
            <div id="info">
                <div class="name">{{info.name}}</div>
                <div class="price">￥{{info.price}}</div>
                <div class="sales">库存:{{info.number}} 销量:{{info.sales}}</div>
                <div class="buynumber"><span @click="opnumber(-1)">-</span><input id="number" type="number"
                                                                                  :value="buynumber" readonly/><span
                        @click="opnumber(1)">+</span></div>
            </div>
        </div>


        <div class="go_box" v-if="golist.length>0">
            <div class="title">--本品团购--</div>
            <div class="golist">
                <div v-for="(goitem,goindex) in golist" class="go">
                    <div class="endtime_str endtime" v-html="goitem.endtime_str"></div>
                    <div class="price">团购价格: <span>￥{{goitem.price}}</span></div>
                    <div class="number">参团人数:{{goitem.current_number}}/{{goitem.number}}</div>
                    <router-link class="btn" :to="'/pages/go/detail?id='+goitem.id">立即参团</router-link>
                </div>
            </div>
        </div>
        <div class="detail">
            <div class="title">--商品详情--</div>
            <div class=" raic-text" v-html="info.detail">{{info.detail}}</div>
        </div>
        <div class="bottom">
            <div class="home_btn">
                <router-link to="/" class="btn">
                    <i class="icon iconfont icon-shouye"></i>
                    <span>首页</span>
                </router-link>
            </div>
            <div @click="buy()" class="buy_btn">立即购买</div>
        </div>
    </div>
</template>
<script src="./main.js"></script>
<style lang="less" src="./main.less" scoped></style>
